package com.yyy.reflect;

/**
 * @Project ：learn_spring
 * @File ：Car.java
 * @IDE ：IntelliJ IDEA
 * @Author ：自由如风间
 * @Date ：2025/3/31 15:32
 * @Description ：For study.
 */

public class Car {

    // 品牌
    private String brand;
    // 使用时间
    private Integer age;
    private String color;

    private void run() {
        System.out.println("私有方法-run正在run......");
    }

    public Car() {
    }

    public Car(String brand, Integer age, String color) {
        this.brand = brand;
        this.age = age;
        this.color = color;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Car{" +
                "brand='" + brand + '\'' +
                ", age=" + age +
                ", color='" + color + '\'' +
                '}';
    }
}
